//
//  PTView.m
//  抽奖页面
//
//  Created by iOS程序员 on 15/12/3.
//  Copyright © 2015年 iOS程序员. All rights reserved.
//

#import "PTView.h"
#import "Hong.pch"
@implementation PTView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.myView= [[UIImageView alloc]init];
        [self addSubview:_myView];
        
        self.myLabel = [[UILabel alloc]init];
        [self addSubview:_myLabel];
        self.myLabel.textAlignment = NSTextAlignmentCenter;
        self.myLabel.font = [UIFont systemFontOfSize:13*WIDTH];
        self.myLabel.textColor = [UIColor yellowColor];
        self.myLabel.numberOfLines = 2;
    }
    return self;
}


- (void)layoutSubviews{
    [super layoutSubviews];
    
    CGFloat width = self.frame.size.width;
    CGFloat height = self.frame.size.height /3 ;
    self.myView.frame = CGRectMake(0, 0, width, height * 2);
    self.myLabel.frame = CGRectMake(0, height * 2, width, height);
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
